﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS_Entity.Model;
using WCS_Entity.Prorocol;
using WCS_Service.DomianService.Models;
using WCS_Service.ProtocolServices.Interface;

namespace WCS_Service.DomianService.Interface
{
    public interface IComBaseDomainManage
    {
        #region 属性
        int autoEquipmentId { get; set; }
        string serviceName { get; set; }
        string areaCode { get; set; }
        string comPara { get; set; }
        string equipmentType { get; set; }
        List<ProtocolEntity> protocolPara { get; set; }
        ConcurrentDictionary<string, ProtocolModel> protocolMsgList { get; set; }
        IProtocolService protocolService { get; set; }
        event Func<ClientSideDisConnectEventArgs, Task> ComDisConnectEvent;
        #endregion

        Task<bool> InitService();
        Task<bool> ConnectAsync();
        Task DisConnectAsync();
        //void ReceiveAsync(IAsyncResult ar);
        Task<bool> SendAsync(string para);
        Task SendHeartbeatAsync();
    }
}
